﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SilverPOP.Data.Process.OperationUnit;
using SilverPOP.Data.Process.BLL;

namespace SilverPOP.Data.Process
{
    public class OperationQueue
    {
        private List<DataAndSchemaProcess> _dataAndSchemaProcessList = null;
        private UserInteraction userInputInteraction = new UserInteraction();

       public OperationQueue()
       {
           userInputInteraction.DoUserInteraction();

           _dataAndSchemaProcessList = new List<DataAndSchemaProcess>();
           InitiateQueue();
       }

       private void InitiateQueue()
       {

           //if (userInputInteraction.SelectedProcess == OperationProcess.SilverPOPDatabaseColumnSchemaCreate)
           //{
           //    _dataAndSchemaProcessList.Add(new AddCustomColumnProcess());
           //}
           //else if (userInputInteraction.SelectedProcess == OperationProcess.SilverPOPDataSyncWithContactList)
           //{
           //    _dataAndSchemaProcessList.Add(new DataSyncProcess(userInputInteraction.CampaignID));
           //}
           //else if (userInputInteraction.SelectedProcess == OperationProcess.SilverPOPDataSyncWithOutContactList)
           //{
           //    _dataAndSchemaProcessList.Add(new DataSyncProcessWithOutContactList(userInputInteraction.CampaignID));
           //}
           //else if (userInputInteraction.SelectedProcess == OperationProcess.SilverPOPDataUpdate)
           //{
           //    _dataAndSchemaProcessList.Add(new DataUpdateProcess(userInputInteraction.CampaignID));
           //}
           //else if (userInputInteraction.SelectedProcess == OperationProcess.SilverPOPRawReport)
           //{
           //    _dataAndSchemaProcessList.Add(new SilverPOPRawReportProcess(userInputInteraction.CampaignID));
           //}
           
           //else if (userInputInteraction.SelectedProcess == OperationProcess.SilverPOPAggregateReport)
           //{
           //    _dataAndSchemaProcessList.Add(new SilverPOPAggregateReportProcess(userInputInteraction.CampaignID));
           //}
             
          
            
       }

       public void DoOperation()
       {
           foreach (DataAndSchemaProcess dataSchemaObj in _dataAndSchemaProcessList)
           {
               dataSchemaObj.ExecuteOperation();
           }
       }
    
    
    }//end class
}
